<template>
  <div>
    <button @click="isShow = !isShow">点我显示/隐藏</button>
    <transition
      enter-active-class="animate__rotateIn"
      leave-active-class="animate__hinge"
    >
      <h2 v-show="isShow" class="animate__animated">你好啊1！</h2>
    </transition>
  </div>
</template>

<script>
  import 'animate.css';
  export default {
    name: "App",
    data() {
      return {
        isShow: true,
      };
    },
  };
</script>

<style>
  * {
    margin: 0;
    padding: 0;
  }
  h2 {
    background-color: orange;
  }
</style>